package com.ece.devirtualizus.Activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageButton;

import com.ece.devirtualizus.R;
import com.ece.devirtualizus.Detectors.AbsDetector;
import com.ece.devirtualizus.Detectors.IndoorFootingDetector;
import com.ece.devirtualizus.Detectors.OutdoorFootingDetector;
import com.ece.devirtualizus.Detectors.PushUpDetector;

public class ChoixReleverActivity extends Activity {
	// User my_user;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		// remove title . FULL SCREEN
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);

		setContentView(R.layout.choix_relever);
		// my_user = getIntent().getExtras().getParcelable("user");

		/* gestion clic sur le bouton ABDO */
		final ImageButton abdo = (ImageButton) findViewById(R.id.buttonAbdo);
		abdo.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(ChoixReleverActivity.this,
						AbsDetector.class);
				startActivity(intent);
			}
		});

		/* gestion clic sur le bouton FOOTING Ext */
		final ImageButton footing_ext = (ImageButton) findViewById(R.id.buttonFootingExt);
		footing_ext.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(ChoixReleverActivity.this,
						OutdoorFootingDetector.class);
				startActivity(intent);
			}
		});
		
		/* gestion clic sur le bouton FOOTING Int*/
		final ImageButton footing_int = (ImageButton) findViewById(R.id.buttonFootingInt);
		footing_int.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(ChoixReleverActivity.this,
						IndoorFootingDetector.class);
				startActivity(intent);
			}
		});

		/* gestion clic sur le bouton POMPES */
		final ImageButton pompes = (ImageButton) findViewById(R.id.buttonPompes);
		pompes.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(ChoixReleverActivity.this,
						PushUpDetector.class);
				startActivity(intent);
			}
		});
	}

}